package per.zhy.demo.apple;

/**
 * Created by zhy on 2018/4/26.
 */
public class Data {

    public static final String DATA = new StringBuffer().append("{")
            .append("\"account\": {")
            .append("        \"name\": \"%s\",")
            .append("        \"password\": \"%s\",")
            .append("        \"person\": {")
            .append("            \"birthday\": \"%s\",")
            .append("            \"name\": {")
            .append("                \"firstName\": \"%s\",")
            .append("                \"lastName\": \"%s\"")
            .append("            },")
            .append("            \"primaryAddress\": {")
            .append("                \"country\": \"CHN\"")
            .append("            }")
            .append("        },")
            .append("        \"preferences\": {")
            .append("            \"marketingPreferences\": {")
            .append("                \"appleNews\": false,")
            .append("                \"appleUpdates\": false,")
            .append("                \"iTunesUpdates\": false")
            .append("            },")
            .append("            \"preferredLanguage\": \"zh_CN\"")
            .append("        },")
            .append("        \"security\": {")
            .append("            \"questions\": [")
            .append("                {")
            .append("                    \"answer\": \"123\",")
            .append("                    \"id\": \"131\",")
            .append("                    \"question\": \"你的第一个宠物叫什么名字？\"")
            .append("                },")
            .append("                {")
            .append("                    \"answer\": \"456\",")
            .append("                    \"id\": \"136\",")
            .append("                    \"question\": \"你的理想工作是什么？\"")
            .append("                },")
            .append("                {")
            .append("                    \"answer\": \"789\",")
            .append("                    \"id\": \"142\",")
            .append("                    \"question\": \"你的父母是在哪里认识的？\"")
            .append("                }")
            .append("            ]")
            .append("        }")
            .append("    },")
            .append("    \"captcha\": {")
            .append("        \"answer\": \"%s\",")
            .append("        \"id\": %s,")
            .append("        \"token\": \"%s\"")
            .append("    }")
            .append("}").toString().replaceAll(" ", "");

    public static void main(String[] args) {
        System.out.println(DATA);
    }

    public static final String SEND_EMAIL = new StringBuffer()
            .append("{")
            .append("    \"account\": {")
            .append("        \"name\": \"%s\",")
            .append("        \"person\": {")
            .append("            \"name\": {")
            .append("                \"firstName\": \"%s\",")
            .append("                \"lastName\": \"%s\"")
            .append("            }")
            .append("        }")
            .append("    }")
            .append("}").toString().replaceAll(" ", "");

    public static final String VAILDATE_EMAIL = new StringBuffer()
            .append("{")
            .append("    \"name\": \"%s\",")
            .append("    \"verificationInfo\": {")
            .append("        \"answer\": \"%s\",")
            .append("        \"id\": \"%s\"")
            .append("    }")
            .append("}").toString().replaceAll(" ", "");


    public static final String FINISHREG_DATA = new StringBuilder().append("{\n")
            .append("    \"account\": {")
            .append("        \"name\": \"%s\",")
            .append("        \"password\": \"%s\",")
            .append("        \"person\": {")
            .append("            \"birthday\": \"%s\",")
            .append("            \"name\": {")
            .append("                \"firstName\": \"%s\",")
            .append("                \"lastName\": \"%s\"")
            .append("            },")
            .append("            \"primaryAddress\": {")
            .append("                \"country\": \"CHN\"")
            .append("            }")
            .append("        },")
            .append("        \"preferences\": {")
            .append("            \"marketingPreferences\": {")
            .append("                \"appleNews\": false,")
            .append("                \"appleUpdates\": false,")
            .append("                \"iTunesUpdates\": false")
            .append("            },")
            .append("            \"preferredLanguage\": \"zh_CN\"")
            .append("        },")
            .append("        \"security\": {")
            .append("            \"questions\": [")
            .append("                {")
            .append("                    \"answer\": \"123\",")
            .append("                    \"id\": \"130\",")
            .append("                    \"question\": \"你少年时代最好的朋友叫什么名字？\"")
            .append("                },")
            .append("                {")
            .append("                    \"answer\": \"456\",")
            .append("                    \"id\": \"136\",")
            .append("                    \"question\": \"你的理想工作是什么？\"")
            .append("                },")
            .append("                {")
            .append("                    \"answer\": \"789\",")
            .append("                    \"id\": \"142\",")
            .append("                    \"question\": \"你的父母是在哪里认识的？\"")
            .append("                }")
            .append("            ]")
            .append("        },")
            .append("        \"verificationInfo\": {")
            .append("            \"answer\": \"%s\",")
            .append("            \"id\": \"%s\"")
            .append("        }")
            .append("    }")
            .append("}").toString().replaceAll(" ", "");


}
